package study2018.com.xtianzhuang.www.test;

import java.util.Scanner;

public class Main3 {
	public static String str = "";

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int num = s.nextInt();
		getJiqi(num);
		String[] strs = str.split("");
		String result = "";
		for (int i = strs.length - 1; i >= 0; i--) {
			result += strs[i];
		}
		System.out.println(result);
	}

	public static void getJiqi(int i) {
		int temp = i;
		if (i == 0) {

		} else if (i % 2 == 0) {
			temp = (temp - 2) / 2;
			str += "2";
			getJiqi(temp);
		} else {
			temp = (temp - 1) / 2;
			str += "1";
			getJiqi(temp);
		}
	}

}
